
<div class="bx_sys_file_upload_wrapper1">

    <div class="bx_sys_file_upload_line">
  
		<div class="bx_sys_file_upload_title">
			<bx_text:_modzzz_location_form_caption_deal_caption />
		</div> 
		<div class="input_wrapper input_wrapper_text">
            <input class="form_input_text" type="text" name="dealcaption[]" size="18" />
			<div class="input_close input_close_text"></div>
        </div> 
        <img src="<bx_icon_url:action_fave.png />" title="Add" alt="Add" class="multiply_add_button" onclick="$(this).parent().parent().append($(this).parent().clone().find('img.multiply_add_button').remove().end().find('img.multiply_remove_button').show().end().hide()).find('.bx_sys_file_upload_line').slideDown();" />
        <img src="<bx_icon_url:action_block.png />" title="Remove" alt="Remove" class="multiply_remove_button" onclick="var $this = this; $(this).parent().slideUp(function () { $($this).parent().remove(); });" style="display:none;" />
        <div class="clear_both"></div>
  
		<div class="bx_sys_file_upload_title">
			<bx_text:_modzzz_location_form_caption_deal_price />
		</div> 
		<div class="input_wrapper input_wrapper_text">
            <input class="form_input_text" type="text" name="price[]" size="18" />
			<div class="input_close input_close_text"></div>
        </div>
		<div class="clear_both"></div>
 
		<div class="bx_sys_file_upload_title">
			<bx_text:_modzzz_location_form_caption_deal_start_date />
		</div> 
		<div class="input_wrapper input_wrapper_select">
            <select class="form_input_select" id="start_date_month" name="start_date_month[]"  style='width:100px'></select>
            <select class="form_input_select" id="start_date_day"  name="start_date_day[]"  style='width:50px'></select> 
            <select class="form_input_select" id="start_date_yr" name="start_date_yr[]" style='width:50px'></select>
			
			<div class="input_close input_close_select"></div>
        </div>
		<div class="clear_both"></div>
 
		<div class="bx_sys_file_upload_title">
			<bx_text:_modzzz_location_form_caption_deal_end_date />
		</div> 
		<div class="input_wrapper input_wrapper_select">
            <select class="form_input_select" id="end_date_month" name="end_date_month[]"  style='width:100px'></select>
            <select class="form_input_select" id="end_date_day"  name="end_date_day[]"  style='width:50px'></select> 
            <select class="form_input_select" id="end_date_yr" name="end_date_yr[]" style='width:50px'></select>
			 
			<div class="input_close input_close_select"></div>
        </div>
		<div class="clear_both"></div>
 
		<div class="bx_sys_file_upload_title">
			<bx_text:_modzzz_location_form_caption_deal_count />
		</div> 
		<div class="input_wrapper input_wrapper_text">
            <input class="form_input_text" type="text" name="count[]" size="18" />
			<div class="input_close input_close_text"></div>
        </div>
		<div class="clear_both"></div>
  
    </div> 
</div>

<script type="text/javascript">

//Declaration of global variable starts
//instantiate date object
var objDate = new Date();
//obtaining current year
var strCurrentYear = objDate.getFullYear();
//creating arrays of day, month and year
var arrDay = new Array();
var arrMonth = new Array();
var arrYear = new Array();
//We are limiting user to choose date before 50 years and after 50 years from current year
var intLimiter = 50;

var aMonth = [
'',
'<bx_text:_January />', 
'<bx_text:_February />',
'<bx_text:_March />',
'<bx_text:_April />',
'<bx_text:_May />',
'<bx_text:_June />',
'<bx_text:_July />',
'<bx_text:_August />',
'<bx_text:_September />',
'<bx_text:_October />',
'<bx_text:_November />',
'<bx_text:_December />' 
];



//This function will fill comboboxes on a page load
function fillCombo()
{
	//Fill "day" combobox with day values
	for(var strValue=1;strValue <= 31;strValue++ )
	{ 
		addOption(document.getElementById('start_date_day'), strValue, strValue);
		addOption(document.getElementById('end_date_day'), strValue, strValue); 
	}
	//Fill "Month" combobox with Month values
	for(var strValue=1;strValue <= 12;strValue++ )
	{
		addOption(document.getElementById('start_date_month'), aMonth[strValue], strValue);
		addOption(document.getElementById('end_date_month'), aMonth[strValue], strValue);
	}
	//Fill "Year" combobox with Year values
	for(strValue=strCurrentYear; strValue <= strCurrentYear + intLimiter; strValue++ )
	{
		addOption(document.getElementById('start_date_yr'), strValue, strValue);
		addOption(document.getElementById('end_date_yr'), strValue, strValue);
	}
}

//This function will add options to combobox
function addOption(selectbox,text,value )
{
	//Create HTML element OPTION in DOM and store into an object named optn
	var optn = document.createElement("OPTION");
	//Assign value in a variable called text to text property of object optn(which is handle to OPTION element)
	optn.text = text;
 
	//Assign value in a variable called value to value property of object optn(which is handle to OPTION element)
	optn.value = value;
	//Append object to <SELECT> element
	selectbox.options.add(optn);
}

//This function checks leap year
function checkLeap(year)
{
	if (year%4==0)//e.g. years like 2004
	{
		return true
	}
	else
	{
		return false;
	}
}


</script>